package demo6;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext("demo6");
        DBConnection db1 = context.getBean(DBConnection.class);
        DBConnection db2 = context.getBean(DBConnection.class);
        System.out.println("db1:"+db1);
        System.out.println("db2:"+db2);
    }
}
